unit Unit_DM;

{$WARN SYMBOL_PLATFORM OFF}

interface

uses
  Windows, Messages, SysUtils, Classes, ComServ, ComObj, VCLCom, DataBkr,
  DBClient, Server_TLB, StdVcl, DB, ADODB, Provider;

type
  TOCMSServer = class(TRemoteDataModule, IOCMSServer)
    qryOCHeader: TADOQuery;
    pvOCHeader: TDataSetProvider;
    qryOCTail: TADOQuery;
    pvOCTail: TDataSetProvider;
    pvOF: TDataSetProvider;
    qryOF: TADOQuery;
    qryTemp: TADOQuery;
    pvTemp: TDataSetProvider;
    qryDevices: TADOQuery;
    pvDevices: TDataSetProvider;
    qryDevicePort: TADOQuery;
    pvDevicePort: TDataSetProvider;
    qryUnit: TADOQuery;
    pvUnit: TDataSetProvider;
    qryOCSearch: TADOQuery;
    pvOCSearch: TDataSetProvider;
    qryBusiness: TADOQuery;
    pvBusiness: TDataSetProvider;
    qryUsers: TADOQuery;
    pvUsers: TDataSetProvider;
    qryLog: TADOQuery;
    pvLog: TDataSetProvider;
    pvBoundBusiness: TDataSetProvider;
    qryBoundBusiness: TADOQuery;
    qryOCType: TADOQuery;
    pvOCType: TDataSetProvider;
    qryLayType: TADOQuery;
    pvLayType: TDataSetProvider;
  private
    { Private declarations }
  protected
    class procedure UpdateRegistry(Register: Boolean; const ClassID, ProgID: string); override;
  public
    { Public declarations }
  end;

implementation

uses Unit_Main;

{$R *.DFM}

class procedure TOCMSServer.UpdateRegistry(Register: Boolean; const ClassID, ProgID: string);
begin
  if Register then
  begin
    inherited UpdateRegistry(Register, ClassID, ProgID);
    EnableSocketTransport(ClassID);
    EnableWebTransport(ClassID);
  end else
  begin
    DisableSocketTransport(ClassID);
    DisableWebTransport(ClassID);
    inherited UpdateRegistry(Register, ClassID, ProgID);
  end;
end;

initialization
  TComponentFactory.Create(ComServer, TOCMSServer,
    Class_OCMSServer, ciMultiInstance, tmApartment);
end.
